Repository navigation
[select] Ignore a mouseup that already happened before the trigger listens - #6116
Closed
rohits2501 wants to merge 1 commit into
Closed
rohits2501 wants to merge 1 commit into
rohits2501 wants to merge 1 commit into
Conversation
…stens A click can end before the deferred close listener is armed, so the next unrelated mouseup was closing the popup.
rohits2501
requested review from
atomiks,
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
October 27, 2026 15:12
commit: |
Bundle size
PerformanceNo regressions in 36 benchmarks · ran 2m 49s · details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
Tested the reported cases on the deploy preview Select demo (https://deploy-preview-6116--base-ui.netlify.app/react/components/select), using the issue's same-task
On each fast click the only |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6042.
A fast click can release the mouse before the deferred
mouseuplistener is armed. That{ once: true }listener then stays registered, and the nextmouseupoutside the trigger closes the select withcancel-open.The trigger still waits one task before listening, so a Firefox
mouseupfired duringmousedowndoes not close the popup. If that opening press has already ended, the close listener is not added.Test plan
SelectTrigger.test.tsx: a same-turn release stays open after a later outsidemouseup. The existing held-press cases still pass.mouseupoutside the trigger. A press held past the delay still closes when released off the trigger.Made with Cursor